package ZhuHongf;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class ShanChu {
    public static void main(String[] args) {
        List list= new ArrayList();
        for (int i = 0; i < 10; i++) {
            list.add((int) (Math.random() * 10));
        }
        System.out.println(list);
        Iterator it = list.iterator();
        while (it.hasNext()) {
            if (((int) it.next()) % 2 == 0) {
                it.remove();
            }
        }
        System.out.println(list);
    }
}
